//
//  XCBaseTableViewController.swift
//  小陈微博Swift用纯代码创建
//
//  Created by 小陈 on 16/2/26.
//  Copyright © 2016年 小陈. All rights reserved.
//

import UIKit

class XCBaseTableViewController: UITableViewController,VisitorLoginViewDelegate{
 // 用户是否登记
    var userlogn = false
    // 访问登录视图
    var visitorlongin : XCVisitorView?
    
    override func loadView() {
        if (userlogn ){
        super.loadView()
        return
            
        }
        
        visitorlongin = NSBundle.mainBundle().loadNibNamed("XCVisitorView", owner: nil, options: nil).last as? XCVisitorView
        /// 指定访问视图的代理对象
        visitorlongin?.delegate = self;
        
       view = visitorlongin
        
    navigationItem.leftBarButtonItem = UIBarButtonItem(title: "注册", style: UIBarButtonItemStyle.Plain, target: self, action: "didSelectResgisterButton")
    navigationItem.rightBarButtonItem = UIBarButtonItem(title: "登录", style: UIBarButtonItemStyle.Plain, target: self, action: "didSelectedLonginButton")
    }
    func didSelectResgisterButton(){ 
    print("\(__FUNCTION__)")
             print("注册按钮")
    }
    func didSelectedLonginButton(){
    print("\(__FUNCTION__)")
         print("登录按钮")
    }
    


}
